<template>
  <el-dialog  :close-on-click-modal="false" :visible.sync="visible">
    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" >
      <el-form-item label="是否开启分佣" prop="name">
         <el-radio v-model="is_pass" label="1">审核通过</el-radio>
          <el-radio v-model="is_pass" label="2">审核不通过</el-radio>
      </el-form-item>
      <span>如果不开启会员折扣，该商品则不享受会员等级折扣价</span>
      <div>
          <el-radio-group v-model="radio1">
            <el-radio-button label="小程序分佣"></el-radio-button>
            <el-radio-button label="App分佣"></el-radio-button>
          </el-radio-group>
        </div>
        <el-form-item label="返佣设置" prop="name">
           <el-radio v-model="is_pass" label="1">默认</el-radio>
            <el-radio v-model="is_pass" label="2">自定义</el-radio>
        </el-form-item>
        <span>如不开启单独分销则默认使用全局折扣比例</span>
      <el-form-item label="购买人的身份是" prop="type">
        <el-input  placeholder=""></el-input>
      </el-form-item>
       
       
        
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">取消</el-button>
      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
    </span>
  </el-dialog>
</template>

<script>
  export default {
    data () {
      return {
        visible: false,
        is_pass: 1,
        dataForm: {
          id: '0'
        },
        value: 1,
        options: [
          {
            name: '图片内容不符合',
            value: 0
          }, {
            name: '直播时间过长',
            value: 1
          }, {
            name: '其它',
            value: 2
          }
        ],
        dataRule: {
          type: [
              { required: true, message: '菜单名称不能为空', trigger: 'blur' }
          ],
          name: [
              { required: true, message: '菜单名称不能为空', trigger: 'blur' }
          ]
        }
      }
    },
    methods: {
      init (id) {
        this.dataForm.id = id || 0
        this.visible = true
            // this.$nextTick(() => {
            //   this.$refs['dataForm'].resetFields()
            // })
      }
    }
  }
</script>

<style>
</style>
